package com.choichumgming.rentcat.handler;

import com.choichumgming.rentcat.common.api.CommonResult;
import com.choichumgming.rentcat.exception.GlobalException;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
//
///**
// * 全局Runtime异常处理器
// */
//@RestControllerAdvice
//@Order(value = Ordered.HIGHEST_PRECEDENCE)
//public class GlobalExceptionHandler {
//
//    @ExceptionHandler(value = Exception.class)
//    public CommonResult exception(Exception e) {
//        e.printStackTrace();
//        return  CommonResult.failed("系统异常");
//    }
//
//    @ExceptionHandler(value = GlobalException.class)
//    public CommonResult globalException(GlobalException e) {
//        e.printStackTrace();
//        return CommonResult.failed( e.getMsg());
//    }
//
//}
